package cn.tedu.demo.mapper;

import cn.tedu.demo.entity.Sku;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SkuMapper {
    @Select("slect * from sku")
    List<Sku> select();

    @Delete("delete from sku where skuname=#{skuname}")
    void deleteBySkuName(String skuname);

    @Select("select * from sku where skuname=#{skuname}")
    Sku selectBySkuName(String skuname);

    @Insert("insert into sku values(null,#{skuname},#{type})")
    void insert(Sku sku);
}
